﻿

namespace BotDetector.Core.Detector
{
    public class AnalyzerFactory
    {
        public IAnalyzer Create(AnalyzeTypeEnum analyzeType, string phrase)
        {       
            BotDetector detector = new BotDetector();                      
            BotLength phraseLength = detector.DetectLength(phrase);

            if (analyzeType.Equals(AnalyzeTypeEnum.Exact))
            {
                return new ExactPhraseAnalyzor(phraseLength);
            }
            return new KeyWordsAnalyzor(phraseLength);            
        }
    }
}
